package cn.panxing.server.search;

import java.io.File;
import junit.framework.TestCase;

public class PXTestCase extends TestCase {

	protected String docDir;
	protected String indexDir;
	
	protected void setUp() throws Exception {
		super.setUp();
		docDir = getDirectory("doc.dir");
		indexDir = getDirectory("index.dir");
	}

	
	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public String getDirectory(String key){
		String dir = System.getProperty(key);
		
		if (dir == null ) {
			fail("Property '" + key + "' not defined.");
		}
		return dir + File.separator;
	}
	
	
}
